package com.pmcc.cj.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.pmcc.core.entity.UUIDEntity;
import com.pmcc.utils.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

/**
 * 业务员和激活码的绑定表
 * Created by tomas on 2020/10/6.
 */
@Entity
@Table(name = "cj_activation_sale")
public class CjActivationSale extends UUIDEntity {
    @Column(name = "employee_id")
    private String employeeId;//业务员id（用的是employee表）
    @Column(name = "employee_name")
    private String employeeName;//业务员名称
    @Column(name = "activation_code")
    private String activationCode;//激活码
    @Column(name = "use_date")
    private Date useDate;//激活码使用时间
    @Column(name = "create_date")
    private Date createDate;
    @Column(name = "code_type")
    private Integer codeType;//激活码类型  0：县级代理 1：种地大户激活码  2：零售商
    @Column(name = "use_flag")
    private Integer useFlag;//是否启用  0：未用    1：启用
    @Column(name = "del_flag")
    private Integer delFlag;//删除标记  0：正常    1：删除
    @Column(name = "address")
    private String address;//地址


    @Transient
    private String[] searchTime;
    @Transient
    private Integer codeNumber;

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String[] getSearchTime() {
        return searchTime;
    }

    public void setSearchTime(String[] searchTime) {
        this.searchTime = searchTime;
    }

    public String getEmployeeId() {
        return employeeId;
    }

    public void setEmployeeId(String employeeId) {
        this.employeeId = employeeId;
    }

    public String getActivationCode() {
        return activationCode;
    }

    public void setActivationCode(String activationCode) {
        this.activationCode = activationCode;
    }
    @JsonSerialize(using = DateTimeFormat.class)
    public Date getUseDate() {
        return useDate;
    }

    public void setUseDate(Date useDate) {
        this.useDate = useDate;
    }
    @JsonSerialize(using = DateTimeFormat.class)
    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Integer getCodeType() {
        return codeType;
    }

    public void setCodeType(Integer codeType) {
        this.codeType = codeType;
    }

    public Integer getUseFlag() {
        return useFlag;
    }

    public void setUseFlag(Integer useFlag) {
        this.useFlag = useFlag;
    }

    public Integer getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }

    public String getEmployeeName() {
        return employeeName;
    }

    public void setEmployeeName(String employeeName) {
        this.employeeName = employeeName;
    }

    public Integer getCodeNumber() {
        return codeNumber;
    }

    public void setCodeNumber(Integer codeNumber) {
        this.codeNumber = codeNumber;
    }

}
